home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C / Applications / Portable Patmos / usr / include / rpcsvc / nlm_prot.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-08  |  4.0 KB  |  213 lines  |  [TEXT/R*ch]

  1. #define LM_MAXSTRLEN    1024
  2. #define MAXNAMELEN    LM_MAXSTRLEN+1
  3.  
  4. enum nlm_stats {
  5.     nlm_granted = 0,
  6.     nlm_denied = 1,
  7.     nlm_denied_nolocks = 2,
  8.     nlm_blocked = 3,
  9.     nlm_denied_grace_period = 4,
  10. };
  11. typedef enum nlm_stats nlm_stats;
  12. bool_t xdr_nlm_stats();
  13.  
  14.  
  15. struct nlm_holder {
  16.     bool_t exclusive;
  17.     int svid;
  18.     netobj oh;
  19.     u_int l_offset;
  20.     u_int l_len;
  21. };
  22. typedef struct nlm_holder nlm_holder;
  23. bool_t xdr_nlm_holder();
  24.  
  25.  
  26. struct nlm_testrply {
  27.     nlm_stats stat;
  28.     union {
  29.         struct nlm_holder holder;
  30.     } nlm_testrply_u;
  31. };
  32. typedef struct nlm_testrply nlm_testrply;
  33. bool_t xdr_nlm_testrply();
  34.  
  35.  
  36. struct nlm_stat {
  37.     nlm_stats stat;
  38. };
  39. typedef struct nlm_stat nlm_stat;
  40. bool_t xdr_nlm_stat();
  41.  
  42.  
  43. struct nlm_res {
  44.     netobj cookie;
  45.     nlm_stat stat;
  46. };
  47. typedef struct nlm_res nlm_res;
  48. bool_t xdr_nlm_res();
  49.  
  50.  
  51. struct nlm_testres {
  52.     netobj cookie;
  53.     nlm_testrply stat;
  54. };
  55. typedef struct nlm_testres nlm_testres;
  56. bool_t xdr_nlm_testres();
  57.  
  58.  
  59. struct nlm_lock {
  60.     char *caller_name;
  61.     netobj fh;
  62.     netobj oh;
  63.     int svid;
  64.     u_int l_offset;
  65.     u_int l_len;
  66. };
  67. typedef struct nlm_lock nlm_lock;
  68. bool_t xdr_nlm_lock();
  69.  
  70.  
  71. struct nlm_lockargs {
  72.     netobj cookie;
  73.     bool_t block;
  74.     bool_t exclusive;
  75.     struct nlm_lock alock;
  76.     bool_t reclaim;
  77.     int state;
  78. };
  79. typedef struct nlm_lockargs nlm_lockargs;
  80. bool_t xdr_nlm_lockargs();
  81.  
  82.  
  83. struct nlm_cancargs {
  84.     netobj cookie;
  85.     bool_t block;
  86.     bool_t exclusive;
  87.     struct nlm_lock alock;
  88. };
  89. typedef struct nlm_cancargs nlm_cancargs;
  90. bool_t xdr_nlm_cancargs();
  91.  
  92.  
  93. struct nlm_testargs {
  94.     netobj cookie;
  95.     bool_t exclusive;
  96.     struct nlm_lock alock;
  97. };
  98. typedef struct nlm_testargs nlm_testargs;
  99. bool_t xdr_nlm_testargs();
  100.  
  101.  
  102. struct nlm_unlockargs {
  103.     netobj cookie;
  104.     struct nlm_lock alock;
  105. };
  106. typedef struct nlm_unlockargs nlm_unlockargs;
  107. bool_t xdr_nlm_unlockargs();
  108.  
  109. /*
  110.  * The following enums are actually bit encoded for efficient
  111.  * boolean algebra.... DON'T change them.....
  112.  */
  113.  
  114. enum fsh_mode {
  115.     fsm_DN = 0,
  116.     fsm_DR = 1,
  117.     fsm_DW = 2,
  118.     fsm_DRW = 3,
  119. };
  120. typedef enum fsh_mode fsh_mode;
  121. bool_t xdr_fsh_mode();
  122.  
  123.  
  124. enum fsh_access {
  125.     fsa_NONE = 0,
  126.     fsa_R = 1,
  127.     fsa_W = 2,
  128.     fsa_RW = 3,
  129. };
  130. typedef enum fsh_access fsh_access;
  131. bool_t xdr_fsh_access();
  132.  
  133.  
  134. struct nlm_share {
  135.     char *caller_name;
  136.     netobj fh;
  137.     netobj oh;
  138.     fsh_mode mode;
  139.     fsh_access access;
  140. };
  141. typedef struct nlm_share nlm_share;
  142. bool_t xdr_nlm_share();
  143.  
  144.  
  145. struct nlm_shareargs {
  146.     netobj cookie;
  147.     nlm_share share;
  148.     bool_t reclaim;
  149. };
  150. typedef struct nlm_shareargs nlm_shareargs;
  151. bool_t xdr_nlm_shareargs();
  152.  
  153.  
  154. struct nlm_shareres {
  155.     netobj cookie;
  156.     nlm_stats stat;
  157.     int sequence;
  158. };
  159. typedef struct nlm_shareres nlm_shareres;
  160. bool_t xdr_nlm_shareres();
  161.  
  162.  
  163. struct nlm_notify {
  164.     char *name;
  165.     long state;
  166. };
  167. typedef struct nlm_notify nlm_notify;
  168. bool_t xdr_nlm_notify();
  169.  
  170.  
  171. #define NLM_PROG ((u_long)100021)
  172. #define NLM_VERS ((u_long)1)
  173. #define NLM_TEST ((u_long)1)
  174. extern nlm_testres *nlm_test_1();
  175. #define NLM_LOCK ((u_long)2)
  176. extern nlm_res *nlm_lock_1();
  177. #define NLM_CANCEL ((u_long)3)
  178. extern nlm_res *nlm_cancel_1();
  179. #define NLM_UNLOCK ((u_long)4)
  180. extern nlm_res *nlm_unlock_1();
  181. #define NLM_GRANTED ((u_long)5)
  182. extern nlm_res *nlm_granted_1();
  183. #define NLM_TEST_MSG ((u_long)6)
  184. extern void *nlm_test_msg_1();
  185. #define NLM_LOCK_MSG ((u_long)7)
  186. extern void *nlm_lock_msg_1();
  187. #define NLM_CANCEL_MSG ((u_long)8)
  188. extern void *nlm_cancel_msg_1();
  189. #define NLM_UNLOCK_MSG ((u_long)9)
  190. extern void *nlm_unlock_msg_1();
  191. #define NLM_GRANTED_MSG ((u_long)10)
  192. extern void *nlm_granted_msg_1();
  193. #define NLM_TEST_RES ((u_long)11)
  194. extern void *nlm_test_res_1();
  195. #define NLM_LOCK_RES ((u_long)12)
  196. extern void *nlm_lock_res_1();
  197. #define NLM_CANCEL_RES ((u_long)13)
  198. extern void *nlm_cancel_res_1();
  199. #define NLM_UNLOCK_RES ((u_long)14)
  200. extern void *nlm_unlock_res_1();
  201. #define NLM_GRANTED_RES ((u_long)15)
  202. extern void *nlm_granted_res_1();
  203. #define NLM_VERSX ((u_long)3)
  204. #define NLM_SHARE ((u_long)20)
  205. extern nlm_shareres *nlm_share_3();
  206. #define NLM_UNSHARE ((u_long)21)
  207. extern nlm_shareres *nlm_unshare_3();
  208. #define NLM_NM_LOCK ((u_long)22)
  209. extern nlm_res *nlm_nm_lock_3();
  210. #define NLM_FREE_ALL ((u_long)23)
  211. extern void *nlm_free_all_3();
  212.  
  213.